<!--
 * @Descripttion: 
 * @Copyright: 武汉一一零七科技有限公司©版权所有
 * @Link: www.s1107.com
 * @Contact: QQ:2487937004
 * @LastEditors: cbing
 * @LastEditTime: 2020-05-01 18:41:02
 -->
<script>
	var pnum = {$pnum};
	{if condition="(!isset($search)) OR (!$search)"}
	var search = 0;
	var goUrl = "/{$Request.module}/goods/hslst.html?page="+pnum;
	{else/}
	var search = {$search};
	var goUrl = "/{$Request.module}/goods/search.html?page="+pnum;
	{/if}
	
	$(function(){
		$("#checkAll").click(function () {
		    $("input[class='text_id']:checkbox").prop("checked", this.checked);
		}); 
	});
</script>                           
                        
                        <table class="table table-hover table-bordered">
                            <thead>
                                <tr>
                                    <th style="width:5%"><input type="checkbox" id="checkAll"/></th>
                                    <th style="width:30%">商品标题</th>
                                    <th style="width:10%">缩略图</th>
                                    <th style="width:10%">所属分类</th>
                                    <th style="width:10%">市场价格</th>
                                    <th style="width:10%">销售价格</th>
                                    <th style="width:10%">上架</th>
                                    <th style="width:20%">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            {if condition="$list->isEmpty() == false"}
							{foreach name="list" item="v"} 
                                <tr>
                                    <td><input type="checkbox" class="text_id" name="id" value="{$v.id}" /></td>
                                    <td>{$v.goods_name}</td>   
                                    <td><img src="{$v.thumb_url}" width="80px" height="80px"/></td>
                                    <td>{$v.cate_name}</td>
                                    <td>{$v.market_price}元</td>
                                    <td>{$v.shop_price}元</td>
                                    <td>{if condition="$v['onsale'] eq 1"}上架{elseif condition="$v['onsale'] eq 0" /}下架{/if}</td>                                          
                                    <td><button type="button" class="btn btn-success btn-xs" onclick="recovery({$v.id},this);"><i class="fa fa-paste"></i>&nbsp;恢复商品</button>&nbsp;&nbsp;&nbsp;&nbsp;<button type="button" class="btn btn-danger btn-xs" onclick="delone({$v.id},this);"><i class="fa fa-close"></i>&nbsp;彻底删除</button></td>
                                </tr>
							{/foreach}
							{else/}
							<tr><td colspan="8" style="text-align:center; font-size:14px;">没有找到相关数据</td></tr>
							{/if}								
                            </tbody>
                        </table>
                        <div class="row"><div class="pagination" style="float:right; margin-right:20px;">{$page}</div></div>